<?php 
/* QQ:34734852
 * 业务联系：小鱼
 */
function myError($errno, $errstr, $errfile, $errline, $errarr){  
  if ( $errno != 8 ) {
	  $files  = explode('\\', $errfile);
	  $PaiChu = end($files);
	  $Array  = file_exists( ROOT . APP . '/Config/Exclude.php') ?  include_once ROOT . APP . '/Config/Exclude.php' : array();
	  if ( !in_array( $PaiChu, $Array ) ) {
		  $Err = array(
			  1    => 'FATAL_ERROR',
			  2    => 'E_WARNING', 
			  4    => 'E_PARSE',
			  8    => 'E_NOTICE',
			  256  => 'E_USER_ERROR',
			  512  => 'E_USER_WARNING',
			  1024 => 'E_USER_NOTICE ',
			  4096 => 'E_RECOVERABLE_ERROR',
			  8191 => 'E_ALL',
			  8192 => 'DEPRECATED'
		  ); 
		  include_once ROOT . 'EyouPHP/Template/Error_function.tpl';
		  unset( $Err, $errarr, $errfile, $errline, $errno, $errstr );
		  BUGRUN or die;
	  }
	  unset( $Array, $files, $PaiChu );
  }
} 
function cache_shutdown_error() { 
    $_error = error_get_last();
    if ($_error && in_array($_error['type'], array(1, 4, 8, 16, 64, 256, 4096, E_ALL))) {
	  $Err = array(
	      1    => 'FATAL_ERROR',
		  2    => 'E_WARNING', 
		  4    => 'E_PARSE',
		  8    => 'E_NOTICE',
		  256  => 'E_USER_ERROR',
		  512  => 'E_USER_WARNING',
		  1024 => 'E_USER_NOTICE ',
		  4096 => 'E_RECOVERABLE_ERROR',
		  8191 => 'E_ALL'
	  ); 
	  include_once ROOT . 'EyouPHP/Template/fatal_function.tpl';
	  unset( $_error, $Err );
   }
}
 
register_shutdown_function('cache_shutdown_error');
set_error_handler('myError');










